<?php
class detailAction extends frontAction{
    public function execute(){
        $id = $this->getGetParam("id",0);
		rare_go404If($id==0);
        $news = service_news::getOneByID($id);

		$categoryDao = new DaoCategory();
		$cate = $categoryDao->getOne("id='".$news['categoryID']."'");
		if($cate['id']==2||$cate['parentID']==2){
			$cateID = 2;
		}else{
			$cateID = $news['categoryID'];
		}

		$currentID = service_menu::getCurrent(service_type::NEWS,$cateID);
		$cache = new Cache_request();
		$cache->set("currentID",$currentID);
		$this->assign("currentMenuID",$currentID);
        $this->assign("news",$news);
    } 
}
?>
